/* eslint-disable */
const Service = require('egg').Service;

class CommentService extends Service {
    async add(comment) {
        const { ctx } = this;
        return await ctx.model.Comment.create(comment);
    }

    async remove(id) {
        const { ctx } = this;
        const affectedRows = await ctx.model.Comment.destroy({
            where: { id },
        });
        return affectedRows ? true : false;
    }
}
module.exports = CommentService;